package com.example.demo.exception;

import com.example.demo.enums.StudentExceptionCode;

/**
 * Created by gf on 2018/10/20.
 */
public class StudentException extends RuntimeException {

    private int code;

    public StudentException(StudentExceptionCode studentExceptionCode) {
        super(studentExceptionCode.getDesc());
        this.code = studentExceptionCode.getCode();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
